package com.wsoft.controller;

import com.wsoft.response.ResponseResult;
import com.wsoft.service.IVerificationCodeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 验证码
 *
 * @author: juiet
 * @date: 2024年09月03日 10:48
 */
@RestController
@Tag(name = "验证码获取器")
@RequestMapping("/pub/code")
public class VerificationCodeController {
    @Resource
    IVerificationCodeService verificationCodeService;

    @Operation(summary = "getImage",description = "生成验证码")
    @GetMapping("/getImage")
    public ResponseResult getImage() {
        return ResponseResult.success(verificationCodeService.initImageCode());
    }



}
